/*
 * @Description: 金刚区
 * @Author: iamsmiling
 * @Date: 2021-05-23 15:16:59
 * @LastEditTime: 2021-05-24 21:34:36
 */

import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/domain/local/home/home_king_kong_entity.dart.dart';
import 'package:flutter/material.dart';

class HomeKingKong extends StatelessWidget {
  final List<HomeKingKongEntity> kongos;
  const HomeKingKong({Key? key, required this.kongos}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.symmetric(
          horizontal: R.dimen.dp36, vertical: R.dimen.dp24),
      child: Wrap(
        spacing:
            (R.dimen.width - R.dimen.dp20 * 2 - R.dimen.dp8 * 2 - 49.5 * 4) /
                3.0001,
        runSpacing: R.dimen.dp24,
        children: [
          for (HomeKingKongEntity item in kongos)
            Container(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Image.asset(item.icon),
                  Container(
                      margin: EdgeInsets.only(top: R.dimen.dp4),
                      child: Text(
                        item.label,
                        style: TextStyle(fontSize: R.dimen.sp13),
                      ))
                ],
              ),
            )
        ],
      ),
    );
  }
}
